#include "EnergyDiffusionADKernel.h"

registerMooseObject("TrilobitaApp", EnergyDiffusionADKernel);

InputParameters
EnergyDiffusionADKernel::validParams()
{
    auto params = ADKernelGrad::validParams();
    params.addClassDescription("Same as `Diffusion` in terms of physics/residual, but the Jacobian "
        "is computed using forward automatic differentiation");
    return params;
}

EnergyDiffusionADKernel::EnergyDiffusionADKernel(const InputParameters& parameters) 
    : ADKernelGrad(parameters),
    _energy_diffusion_strong_residual(getADMaterialProperty<RealVectorValue>("energy_diffusion_strong_residual"))
{}

ADRealVectorValue
EnergyDiffusionADKernel::precomputeQpResidual()
{
    return _energy_diffusion_strong_residual[_qp];
}
